package com.zhuoyian.pluginsdk;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.igexin.sdk.PushConsts;
import com.zyasdk.WU;

//import com.igexin.sdk.PushConsts;
//import com.zyasdk.WU;

/**
 * 
 */
public class MyReceiver extends BroadcastReceiver {

	/**
	 * null)
	 */
	public static StringBuilder payloadData = new StringBuilder();

	@Override
	public void onReceive(Context context, Intent intent) {
		Bundle bundle = intent.getExtras();
		switch (bundle.getInt(PushConsts.CMD_ACTION)) {
		case PushConsts.GET_MSG_DATA:
			byte[] payload = bundle.getByteArray("payload");
			if (payload != null) {
				String data = new String(payload);
				WU.push(context, data);
			}
			break;
		default:
			break;
		}
	}
}
